package com.pi.pro.xcmg.am.was.web.report;

/**
 *
 */

import com.pi.common.CodesConstants;
import com.pi.framework.core.util.StringUtils;
import com.pi.pro.xcmg.am.common.vo.report.ReportQueryDto;
import com.pi.pro.xcmg.am.common.vo.report.StationSummaryDailyReportDto;
import com.pi.pro.xcmg.am.common.vo.sys.Result;
import com.pi.wms.service.KanbanReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * 报表(LED屏) 功能
 */
@Slf4j
@RestController("reportStationReportContrller")
@RequestMapping("/api/wms/xcmg/report/kanban/desk")
public class StationReportController {


    @Autowired
    private KanbanReportService kanbanReportService;

    @RequestMapping(value="/summary",method = RequestMethod.POST)
    @ResponseBody
    public Result summary(@RequestBody ReportQueryDto queryParams){
        //
        Map<String, Object> query = new HashMap<>();
        query.put("divisioncode", queryParams.getDivisioncode());

        /**
        Map<String, String> stationstatues=new HashMap<>();
        for (DeskUserInfo ui: DeskUserUtils.deskLoginInfos.values()){
            if (ui==null){
                continue;
            }
            if (!StringUtils.isNullOrBlank(ui.getStationno())) {
                stationstatues.put(ui.getStationno(), CodesConstants.COMMON_FLAG_YES);
            }
        }
         **/
        List<StationSummaryDailyReportDto> desks = null;
        //desks = kanbanReportService.summaryStationWorkDailyData(query, stationstatues);

        return new Result().success().data(desks);
    }
}
